home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 52 / Amiga Format AFCD52 (Issue 136, May 2000).iso / -serious- / workbench / directoryopus4 / dopus4_src / dopus_print / print.h < prev    next >
C/C++ Source or Header  |  2000-03-11  |  3KB  |  129 lines

  1. /*
  2.  
  3. Directory Opus 4
  4. Original GPL release version 4.12
  5. Copyright 1993-2000 Jonathan Potter
  6.  
  7. This program is free software; you can redistribute it and/or
  8. modify it under the terms of the GNU General Public License
  9. as published by the Free Software Foundation; either version 2
  10. of the License, or (at your option) any later version.
  11.  
  12. This program is distributed in the hope that it will be useful,
  13. but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15. GNU General Public License for more details.
  16.  
  17. You should have received a copy of the GNU General Public License
  18. along with this program; if not, write to the Free Software
  19. Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  20.  
  21. All users of Directory Opus 4 (including versions distributed
  22. under the GPL) are entitled to upgrade to the latest version of
  23. Directory Opus version 5 at a reduced price. Please see
  24. http://www.gpsoft.com.au for more information.
  25.  
  26. The release of Directory Opus 4 under the GPL in NO WAY affects
  27. the existing commercial status of Directory Opus 5.
  28.  
  29. */
  30.  
  31. //#include <fctype.h>
  32. #include <string.h>
  33. #include <stdlib.h>
  34. #include <stdarg.h>
  35. #include <exec/types.h>
  36. #include <exec/memory.h>
  37. #include <exec/execbase.h>
  38. #include <intuition/intuitionbase.h>
  39. #include <intuition/sghooks.h>
  40. #include <workbench/workbench.h>
  41. #include <workbench/startup.h>
  42. #include <devices/printer.h>
  43. #include <devices/prtbase.h>
  44. #include <datatypes/datatypesclass.h>
  45. #include <proto/all.h>
  46.  
  47. #include <proto/dopus.h>
  48. #include <dopus/dopusmessage.h>
  49. #include "printstrings.h"
  50.  
  51. extern struct DOpusBase *DOpusBase;
  52. extern struct IntuitionBase *IntuitionBase;
  53. extern struct GfxBase *GfxBase;
  54. extern struct Library *IconBase;
  55. extern struct ExecBase *SysBase;
  56. extern struct DosLibrary *DOSBase;
  57. extern struct Library *WorkbenchBase;
  58. extern struct PPBase *PPBase;
  59.  
  60. struct Directory {
  61.     struct Directory *last,*next;
  62.     char name[32];
  63.     int type;
  64.     int size;
  65.     int subtype;
  66.     int protection;
  67.     char *comment;
  68.     char *dispstr;
  69.     char protbuf[12],datebuf[20];
  70.     int selected;
  71.     char *description;
  72.     int userdata,userdata2;
  73.     struct DateStamp date;
  74. };
  75.  
  76. #define PRINTFLAG_EJECT    1
  77. #define PRINTFLAG_FILE     2
  78.  
  79. #define HEADFOOTFLAG_TITLE 1
  80. #define HEADFOOTFLAG_DATE  2
  81. #define HEADFOOTFLAG_PAGE  4
  82.  
  83. #define PITCH_PICA         0
  84. #define PITCH_ELITE        1
  85. #define PITCH_FINE         2
  86.  
  87. #define PITCH_COUNT        3
  88.  
  89. #define STYLE_NORMAL       0
  90. #define STYLE_BOLD         1
  91. #define STYLE_ITALICS      2
  92. #define STYLE_UNDERLINED   3
  93. #define STYLE_DOUBLESTRIKE 4
  94. #define STYLE_SHADOW       5
  95.  
  96. #define STYLE_COUNT        6
  97.  
  98. #define QUALITY_DRAFT      0
  99. #define QUALITY_NLQ        1
  100.  
  101. #define HEADER             0
  102. #define FOOTER             1
  103.  
  104. typedef struct HeadFootData {
  105.     char text_style;
  106.     char headfoot_flags;
  107.     char headfoot_title[40];
  108. } HeaderFooter;
  109.  
  110. typedef struct MyPrinterData {
  111.     USHORT top_margin;
  112.     USHORT bottom_margin;
  113.     USHORT left_margin;
  114.     USHORT right_margin;
  115.     char tab_size;
  116.     char print_pitch;
  117.     char text_quality;
  118.     char print_flags;
  119.     char output_file[256];
  120.     HeaderFooter headfoot[2];
  121. } PrintData;
  122.  
  123. #define DOUBLESTRIKE_OFF "\x1b[3\"z"
  124. #define SHADOW_OFF       "\x1b[5\"z"
  125.  
  126. extern struct DefaultString default_strings[];
  127.  
  128. #define STRING_VERSION 1
  129.